home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Treccani Italiana Di Scienze Lettere Ed Arti
/
[Enciclopedia] Treccani Italiana di scienze lettere ed arti.iso
/
pc
/
data
/
xxi_appendice_dvd.swf
/
scripts
/
__Packages
/
mx
/
services
/
Log.as
Wrap
Text File
|
2007-11-08
|
1KB
|
43 lines
class mx.services.Log
{
static var NONE = -1;
static var BRIEF = 0;
static var VERBOSE = 1;
static var DEBUG = 2;
function Log(logLevel, name)
{
this.level = logLevel != undefined ? logLevel : mx.services.Log.BRIEF;
this.name = name != undefined ? name : "";
}
function logInfo(msg, level)
{
if(level == undefined)
{
level = mx.services.Log.BRIEF;
}
if(level <= this.level)
{
if(level == mx.services.Log.DEBUG)
{
this.onLog(this.getDateString() + " [DEBUG] " + this.name + ": " + msg);
}
else
{
this.onLog(this.getDateString() + " [INFO] " + this.name + ": " + msg);
}
}
}
function logDebug(msg)
{
this.logInfo(msg,mx.services.Log.DEBUG);
}
function getDateString()
{
var _loc1_ = new Date();
return _loc1_.getMonth() + 1 + "/" + _loc1_.getDate() + " " + _loc1_.getHours() + ":" + _loc1_.getMinutes() + ":" + _loc1_.getSeconds();
}
function onLog(message)
{
}
}